package com.zsrt.java.day20161229.wrl.demo05;

import org.junit.Test;

public class Tank01Test {

	@Test
	public void test() {
		/*Tank tank1 = new Tank();
		tank1.setBrand("灰熊1号");
		tank1.setMoney(200);
		tank1.setWeight(30);
		tank1.setMaxSpeed(800);
		System.out.println(tank1.toString());*/
		
		Tank01 tank2 = new Tank01("ZTZ-99式主战坦克",52,1000,1500);
//		System.out.println(tank2.toString());
		String name  = "飞毛腿导弹";
		int distance = 4500;
		boolean result = tank2.shoot(name, distance);
		if(result){
			System.out.println("能打中");
		}else{
			System.out.println("距离太远，打不中");
		}
	}

}
